------------------------------------------------------------------------------
--                                                                          --
--                          PolyORB HI COMPONENTS                           --
--                                                                          --
--                       P O H I C D R I V E R _ I P                        --
--                                                                          --
--                                 S p e c                                  --
--                                                                          --
--         Copyright (C) 2015-2019 ESA & ISAE, 2019-2020 OpenAADL           --
--                                                                          --
-- PolyORB-HI is free software; you can redistribute it and/or modify under --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
-- sion. PolyORB-HI is distributed in the hope that it will be useful, but  --
-- WITHOUT ANY WARRANTY; without even the implied warranty of               --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     --
--                                                                          --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception,   --
-- version 3.1, as published by the Free Software Foundation.               --
--                                                                          --
-- You should have received a copy of the GNU General Public License and    --
-- a copy of the GCC Runtime Library Exception along with this program;     --
-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
-- <http://www.gnu.org/licenses/>.                                          --
--                                                                          --
--              PolyORB-HI/Ada is maintained by the OpenAADL team           --
--                             (info@openaadl.org)                          --
--                                                                          --
------------------------------------------------------------------------------

pragma Style_Checks (Off); -- turn off style checks
-- Code automatically generated by asn1scc tool
-- Date was: 10/25/2011
-- Time was: 12:46:14

WITH Ada.Strings.Fixed;
USE ADA.Strings.Fixed;

WITH Interfaces;
USE Interfaces;

WITH Ada.Characters.latin_1;


WITH AdaAsn1RTL;
USE AdaAsn1RTL;

package POHICDRIVER_IP is


SUBTYPE Port_T IS Asn1Int;

Port_T_REQUIRED_BYTES_FOR_ENCODING:CONSTANT INTEGER := 2;
Port_T_REQUIRED_BITS_FOR_ENCODING:CONSTANT INTEGER := 15;
Port_T_REQUIRED_BYTES_FOR_ACN_ENCODING:CONSTANT INTEGER := 2;
Port_T_REQUIRED_BITS_FOR_ACN_ENCODING:CONSTANT INTEGER := 15;
Port_T_REQUIRED_BYTES_FOR_XER_ENCODING:CONSTANT INTEGER :=  37;

ERR_Port_T:CONSTANT INTEGER := 1000; -- (0..16535) 



TYPE Version_T IS (ipv4, ipv6);
for Version_T use
	(ipv4 => 0, ipv6 => 1);
for Version_T'Size use 32;

Version_T_REQUIRED_BYTES_FOR_ENCODING:CONSTANT INTEGER := 1;
Version_T_REQUIRED_BITS_FOR_ENCODING:CONSTANT INTEGER := 1;
Version_T_REQUIRED_BYTES_FOR_ACN_ENCODING:CONSTANT INTEGER := 1;
Version_T_REQUIRED_BITS_FOR_ACN_ENCODING:CONSTANT INTEGER := 1;
Version_T_REQUIRED_BYTES_FOR_XER_ENCODING:CONSTANT INTEGER :=  34;

ERR_Version_T_unknown_enumeration_value:CONSTANT INTEGER := 1001; -- invalid enumeration value 



TYPE IP_Conf_T_EXIST IS RECORD
	broadcast:BIT;
	netmask:BIT;
	gateway:BIT;
	dns:BIT;
	version:BIT;
END RECORD;
TYPE IP_Conf_T IS RECORD
    devname : String(1..21);
    address : String(1..41);
    broadcast : String(1..41);
    netmask : String(1..41);
    gateway : String(1..41);
    dns : String(1..41);
    version : Version_T:=ipv4;
    port : Port_T:=0;
    Exist : IP_Conf_T_EXIST;
END RECORD;

IP_Conf_T_REQUIRED_BYTES_FOR_ENCODING:CONSTANT INTEGER := 200;
IP_Conf_T_REQUIRED_BITS_FOR_ENCODING:CONSTANT INTEGER := 1596;
IP_Conf_T_REQUIRED_BYTES_FOR_ACN_ENCODING:CONSTANT INTEGER := 227;
IP_Conf_T_REQUIRED_BITS_FOR_ACN_ENCODING:CONSTANT INTEGER := 1816;
IP_Conf_T_REQUIRED_BYTES_FOR_XER_ENCODING:CONSTANT INTEGER :=  416;

ERR_IP_Conf_T_devname:CONSTANT INTEGER := 1002; -- (SIZE (1..20)) 
ERR_IP_Conf_T_address:CONSTANT INTEGER := 1003; -- (SIZE (1..40)) 
ERR_IP_Conf_T_broadcast:CONSTANT INTEGER := 1004; -- (SIZE (1..40)) 
ERR_IP_Conf_T_netmask:CONSTANT INTEGER := 1005; -- (SIZE (1..40)) 
ERR_IP_Conf_T_gateway:CONSTANT INTEGER := 1006; -- (SIZE (1..40)) 
ERR_IP_Conf_T_dns:CONSTANT INTEGER := 1007; -- (SIZE (1..40)) 



localhost1:aliased IP_Conf_T:=(devname => "eth0" & 16*Character'Val(0) & Character'Val(0),
address => "127.0.0.1" & 31*Character'Val(0) & Character'Val(0),
broadcast => 41*Character'Val(0),
netmask => 41*Character'Val(0),
gateway => 41*Character'Val(0),
dns => 41*Character'Val(0),
version => ipv4,
port => 5489, 
exist => (broadcast => 0, netmask => 0, gateway => 0, dns => 0, version => 0));
localhost2:aliased IP_Conf_T:=(devname => "eth0" & 16*Character'Val(0) & Character'Val(0),
address => "127.0.0.1" & 31*Character'Val(0) & Character'Val(0),
broadcast => 41*Character'Val(0),
netmask => 41*Character'Val(0),
gateway => 41*Character'Val(0),
dns => 41*Character'Val(0),
version => ipv4,
port => 5489, 
exist => (broadcast => 0, netmask => 0, gateway => 0, dns => 0, version => 0));

--END;
end POHICDRIVER_IP;
